package week6;

public class CPU {
        private int speed;

        public void setSpeed(int speed) {
            this.speed = speed;
        }

        public int getSpeed() {
            return speed;
        }

        public static void main(String[] args) {
            CPU cpu = new CPU();
            cpu.setSpeed(2200);
            System.out.println("CPU已设置为" + cpu.getSpeed());
        }
    }